<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
		<title>我的产后信息</title>
		<link rel="stylesheet" href="${BASE_PATH}/static/app/css/reset.css" />
		<link rel="stylesheet" href="${BASE_PATH}/static/app/css/postnatal.css" />
	</head>

	<body>
		<div class="header">
			<a href="${BASE_PATH}/my/myInfo/vipInterests">
				<img src="${BASE_PATH}/static/app/img/201505261053.png" class="header-bg" />
				<c:choose>
					<c:when test="${userDetail.is_vip==1 }">
						<span class="vip-title">绿萝会员</span>
					</c:when>
					<c:otherwise>
						<span class="vip-title">普通会员</span>
					</c:otherwise>
				</c:choose>
				<div class="header-price">
					<%-- <span>产后余额:${userDetail.money }</span> --%>
					<span>ID:${user.card }</span>
				</div>
			</a>
		</div>
		
		<div class="project">
			<h3>我的项目</h3>
			<div class="project-content">
				<c:choose>
					<c:when test="${record!=null }">
						<!--我的项目不为空-->
						<div class="project-box">
							<div class="project-statistical">
								<canvas id="my_html" width="35" height="35"></canvas>
								<div class="project-statistical-tip">
									<p>${record.name }</p>
									<p>剩余${record.last_numbers }个手工</p>
								</div>
								<a href="${BASE_PATH}/my/myInfo/myProject" class="project-look">查看全部项目</a>
							</div>
						</div>
					</c:when>
					<c:otherwise>
						<!--我的项目为空-->
						<div class="project-box">
							<div class="project-bare">
								<p>你还没有购买项目哦</p>
								<a href="${BASE_PATH}/my/myInfo/xiangMu" class="project-lookn">去看看项目简介</a> 
							</div>
						</div>
					</c:otherwise>
				</c:choose>
			</div>
		</div>
		<div class="plan">
			<div class="plan-box">
			   <a href="${BASE_PATH}/my/myInfo/timePlan">
					<img src="${BASE_PATH}/static/app/img/201805261214.png"/>
					<p>理疗时间安排表</p>
				</a>
			</div>
			<div class="plan-log plan-box">
				<div class="plan-log-box">
					<a href="${BASE_PATH}/my/myInfo/serviceLog">
						<img src="${BASE_PATH}/static/app/img/201805261232.png"/>
					    <span>服务记录 
						    <c:if test="${serviceCounts.numbers!=0}">
						      <em class="log-num">${serviceCounts.numbers }</em>
						     </c:if>
					    </span>					     
					</a>    
				</div>
				<div class="plan-log-box">
					<a href="${BASE_PATH}/my/myInfo/myKnown">
						<img src="${BASE_PATH}/static/app/img/201805261232-1.png"/>
					    <span>我的报告</span>
				    </a>
				</div>
			</div>
		</div>
		
		<div class="project belongs">
			<h3>所属店铺</h3>
			 <div class="project-content">
			 	<c:choose>
			 		<c:when test="${userDetail.store_name!=null&&userDetail.store_name!='' }">
					 	<!--所属店铺不为空-->
					 	<div class="project-store project-box">
					 		<img src="${BASE_PATH}/static/app/img/201805261429.png"/>
					 		<div class="project-store-name">
					 			<p>${userDetail.store_name }</p>
					 			<p>我的恢复师:${userDetail.trueName }</p>
					 		</div>
					 	</div>
			 		</c:when>
			 		<c:otherwise>
				 		<!--所属店铺为空-->
					    <div class="project-box">
							<div class="project-bare">
								<p>成为会员找寻你的专属恢复师</p>
								<p><a href="javascript:storeList()"><span class="storeList">去看看店铺分布 </span></a></p>
							</div>
						</div>
			 		</c:otherwise>
			 	</c:choose>
			</div>	
		</div>
	</body>
	<script src="${BASE_PATH}/static/app/js/progress.js"></script>
	<script type="text/javascript" src="${BASE_PATH}/static/lib/jquery/jquery-1.11.2.min.js"></script>
		<script>
			var deg = '${record.numbers }';
			var winWidth = document.body.clientWidth * 16 / document.body.clientWidth;
			var remVal = winWidth / 10;
			var canvas = document.getElementById("my_html");

			var w = canvas.width * remVal,
				h = canvas.height * remVal;
			canvas.width = w;
			canvas.height = h;

			var p1 = new Progress({
				el: 'my_html', //canvas元素id
				deg: deg-0, //绘制角度
				timer: 5, //绘制时间
				lineWidth: 2, //线宽
				lineBgColor: '#f697b7', //底圆颜色
				lineColor: '#ebe5e7', //动态圆颜色
				textColor: '#000', //文本颜色
				fontSize: 12, //字体大小
				circleRadius: 22 //圆半径
			});
			function storeList(){
				window.location.href="https://shop192168.youzan.com/v2/showcase/physicalstore?kdt_id=2014115&reft=1483436461242_1483436467244&spm=f46218164_f46218164_g40139471&sf=wx_menu";
			}
		</script>
</html>